<template>
	<view class="success flex-column-center">
		<view class="flex-row-center">
			<image class="img-success" src="https://newbeaconyt.oss-cn-hangzhou.aliyuncs.com/app/hotel/success.png"
				mode=""></image>
			<view class="font-1e1e1e font18">交易成功</view>
		</view>
		<view class="font15" style="margin: 40rpx 0;">
			<text class="font-1e1e1e" style="margin-right: 12rpx;">实付</text>
			<text class="font-ff6428">{{dataobj.all_score}}积分+￥{{dataobj.price}}</text>
		</view>
		<view class="font-969696 font11">订单已交易，如有问题请联系客服</view>
		<view class="font-969696 font11" style="margin: 18rpx 0 112rpx 0;">400-626-2008</view>
		<view class="success-but flex-row-center">
			<view class="but1" @click="goNext('/pages/integral/paytype?id='+ id)">查看兑换</view>
			<view class="but2" @click="goNext('/pages/integral/index/index')">返回商城</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataobj: {},
				id: null
			}
		},

		onLoad(options) {
			this.id = options.id
			this.getInfo()
		},
		methods: {
			//跳转
			goNext(url) {
				uni.redirectTo({
					url: url
				})
			},
			getInfo() {
				this.$Http({
					url: 'getOrderInfo',
					token: true,
					data: {
						id: this.id
					}
				}).then(res => {
					if (res.code == 1) {
						res.data.all_score = this.$base.numAdd(res.data.score, res.data.crs_score)
						this.dataobj = res.data
					}
				});
			},
		}
	}
</script>

<style lang="less">
	.success {
		padding-top: 110rpx;
		width: 750rpx;
		justify-content: flex-start !important;

		.img-success {
			width: 38rpx;
			height: 38rpx;
			margin-right: 16rpx;
		}

		.success-but {
			view {
				width: 208rpx;
				height: 60rpx;
				border-radius: 30rpx;
				font-size: 26rpx;
				line-height: 60rpx;
				text-align: center;
			}

			.but1 {
				border: solid 1rpx #03004d;
				color: #03004d;
				margin-right: 40rpx;
			}

			.but2 {
				background-color: #03004d;
				color: #ffffff;
			}
		}
	}
</style>